import observe from "./observe.js";
import Watcher from "./Watcher.js";

var obj = {
  a: {
    b: {
      c: 1
    },
    arr: [1, 2, 3],
  },
  m: 1,

}
// 创建observe 函数
// defineReactive(obj, 'a', 1)
// obj.a.e = 12;

observe(obj)
// obj.a.arr.push(4,5,6,7)
// obj.a.arr.unshift(4,5,6,7)
// obj.a.b=2
new Watcher(obj,'a.b.c',(val)=>{
  console.log(">>>>>>",val)
})
obj.a.b.c=123123

console.log(obj)
console.log(obj)
